import http from '@/utils/index'

class ContractType {
    getList(reload) {
        let url = '/contract_type/index';
        return http.get(url, reload)
    }

    // 新增
    createContent(reload) {
        let url = '/contract_type/create';
        return http.post(url, reload)
    }

    // 编辑
    editContent(reload) {
        let url = '/contract_type/edit';
        return http.post(url, reload)
    }

    // 详情 detail 参数 id
    getContentDetail(reload) {
        let url = '/contract_type/detail';
        return http.get(url, reload)
    }

    // 删除
    deleteContent(reload) {
        let url = '/contract_type/delete';
        return http.post(url, reload)
    }

    // 更新唯一字段
    updateOnlyfield(reload) {
        let url = '/contract_type/onlyfield';
        return http.post(url, reload)
    }

    // 获取product
    getAllProduct(reload) {
        let url = '/contract_type/product';
        return http.get(url, reload)
    }
}

export default new ContractType()